package com.kz.service;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBOpenHelper extends SQLiteOpenHelper {

	private static final String DATABASENAME	=	"redlightscamera.db";
	private static final int DATABASEVERSION	=	1;
	
	public DBOpenHelper(Context context){
		super(context,DATABASENAME,null,DATABASEVERSION);
		
	}
	
	@Override
	public void onCreate(SQLiteDatabase db) {
	db.execSQL("CREATE TABLE redlightscamera(_id integer primary key autoincrement,addr1 varchar(100),addr2 varchar(100),direction varchar(100))");
	db.execSQL("insert into redlightscamera (addr1, addr2) values ('annne','pp')");
	db.execSQL("insert into redlightscamera (addr1, addr2) values ('annne1','pp1')");
	db.execSQL("insert into redlightscamera (addr1, addr2) values ('annne2','pp2')");
	db.execSQL("insert into redlightscamera (addr1, addr2) values ('annne3','pp4')");
	db.execSQL("insert into redlightscamera (addr1, addr2) values ('annne4','pp4')");
	db.execSQL("insert into redlightscamera (addr1, addr2) values ('annne41','pp14')");
	
	db.execSQL("CREATE TABLE person (personid integer primary key autoincrement, name varchar(20), amount integer)");
	
	
	
	
	}

	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
		// TODO Auto-generated method stub

	}

}
